home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / LINUX / NFSD / CONST.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  2KB  |  87 lines

  1. /*
  2.  * include/linux/nfsd/nfsconst.h
  3.  *
  4.  * Various constants related to NFS.
  5.  *
  6.  * Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de>
  7.  */
  8.  
  9. #ifndef __NFSCONST_H__
  10. #define __NFSCONST_H__
  11.  
  12. #include <linux/limits.h>
  13. #include <linux/types.h>
  14. #include <linux/unistd.h>
  15. #include <linux/dirent.h>
  16. #include <linux/fs.h>
  17. #include <linux/nfs.h>
  18.  
  19. /*
  20.  * Maximum protocol version supported by knfsd
  21.  */
  22. #define NFSSVC_MAXVERS        3
  23.  
  24. /*
  25.  * Maximum blocksize supported by daemon currently at 8K
  26.  */
  27. #define NFSSVC_MAXBLKSIZE    8192
  28.  
  29. #define NFS2_MAXPATHLEN        1024
  30. #define NFS2_MAXNAMLEN        255
  31. #define NFS2_FHSIZE        NFS_FHSIZE
  32. #define NFS2_COOKIESIZE        4
  33.  
  34. #define NFS3_MAXPATHLEN        PATH_MAX
  35. #define NFS3_MAXNAMLEN        NAME_MAX
  36. #define NFS3_FHSIZE        NFS_FHSIZE
  37. #define NFS3_COOKIEVERFSIZE    8
  38. #define NFS3_CREATEVERFSIZE    8
  39. #define NFS3_WRITEVERFSIZE    8
  40.  
  41. #ifdef __KERNEL__
  42.  
  43. #ifndef NFS_SUPER_MAGIC
  44. # define NFS_SUPER_MAGIC    0x6969
  45. #endif
  46.  
  47. /*
  48.  * NFS stats. The good thing with these values is that NFSv3 errors are
  49.  * a superset of NFSv2 errors (with the exception of NFSERR_WFLUSH which
  50.  * no-one uses anyway), so we can happily mix code as long as we make sure
  51.  * no NFSv3 errors are returned to NFSv2 clients.
  52.  */
  53. #define NFS_OK            0        /* v2 v3 */
  54. #define NFSERR_PERM        1        /* v2 v3 */
  55. #define NFSERR_NOENT        2        /* v2 v3 */
  56. #define NFSERR_IO        5        /* v2 v3 */
  57. #define NFSERR_NXIO        6        /* v2 v3 */
  58. #define NFSERR_ACCES        13        /* v2 v3 */
  59. #define NFSERR_EXIST        17        /* v2 v3 */
  60. #define NFSERR_XDEV        18        /*    v3 */
  61. #define NFSERR_NODEV        19        /* v2 v3 */
  62. #define NFSERR_NOTDIR        20        /* v2 v3 */
  63. #define NFSERR_ISDIR        21        /* v2 v3 */
  64. #define NFSERR_INVAL        22        /*    v3 */
  65. #define NFSERR_FBIG        27        /* v2 v3 */
  66. #define NFSERR_NOSPC        28        /* v2 v3 */
  67. #define NFSERR_ROFS        30        /* v2 v3 */
  68. #define NFSERR_MLINK        31        /*    v3 */
  69. #define NFSERR_NAMETOOLONG    63        /* v2 v3 */
  70. #define NFSERR_NOTEMPTY        66        /* v2 v3 */
  71. #define NFSERR_DQUOT        69        /* v2 v3 */
  72. #define NFSERR_STALE        70        /* v2 v3 */
  73. #define NFSERR_REMOTE        71        /*    v3 */
  74. #define NFSERR_WFLUSH        99        /* v2    */
  75. #define NFSERR_BADHANDLE    10001        /*    v3 */
  76. #define NFSERR_NOT_SYNC        10002        /*    v3 */
  77. #define NFSERR_BAD_COOKIE    10003        /*    v3 */
  78. #define NFSERR_NOTSUPP        10004        /*    v3 */
  79. #define NFSERR_TOOSMALL        10005        /*    v3 */
  80. #define NFSERR_SERVERFAULT    10006        /*    v3 */
  81. #define NFSERR_BADTYPE        10007        /*    v3 */
  82. #define NFSERR_JUKEBOX        10008        /*    v3 */
  83.  
  84. #endif /* __KERNEL__ */
  85.  
  86. #endif /* __NFSCONST_H__ */
  87.